<?php

use think\facade\Route;

/** 素材 */
Route::group('material/category', function () {
    // 素材分组
    Route::post('<type>', '@createCategory');
    Route::put(':id', '@updateCategory')->pattern(['id' => '\d+']);
    Route::delete(':id', '@deleteCategory')->pattern(['id' => '\d+']);
})->prefix('\app\admin\service\material\Category');

/** 素材 */
Route::group('material', function () {
    Route::get('<type>', '@<type>'); // 系统配置页面
    Route::put('update/<id>/<field>', '@updateMaterial')->pattern(['id' => '\d+', 'field' => '[\w_]+']);
    Route::delete(':id', '@delete')->pattern(['id' => '[\d,]+']);
    Route::delete(':really/:id', '@delete')->pattern(['id' => '[\d,]+']);
    Route::post('move', '@move');
    Route::post('upload', '@upload');
    // Route::post('video/bokecc/sync', '@bokeccVideoSync');
    // 同步到本地
    Route::post('sync/video/local', '@syncVideoToLocal');
})->prefix('\app\admin\service\material\Material')->name('material');
